Skip to content

feat(proto): generate datafusion-proto Java classes at build time#9

Merged
andygrove merged 5 commits into
apache:mainfrom
andygrove:proto-build
May 13, 2026
Merged

feat(proto): generate datafusion-proto Java classes at build time#9
andygrove merged 5 commits into
apache:mainfrom
andygrove:proto-build

Conversation

@andygrove
Copy link
Copy Markdown
Member

Closes #4.

Adds a Maven build pipeline that downloads datafusion_common.proto and datafusion.proto from apache/datafusion at a pinned tag (53.1.0, matching native/Cargo.toml) and generates Java classes from them via the Xolstice protobuf-maven-plugin. Generated classes ship inside the existing datafusion-java jar — the org.apache.datafusion.protobuf.* namespace from datafusion.proto, plus datafusion_common.* from datafusion_common.proto.

Also adds a bootstrap CONTRIBUTING.md whose primary content is the DataFusion / protobuf schema version-sync recipe. Bumping DataFusion now requires updating three things together: native/Cargo.toml, pom.xml's <datafusion.version>, and the SHA-512 pins on the two downloads. The recipe documents the exact commands to do that.

End-to-end functionality — Java code constructing a plan via these classes and executing it through SessionContext — is tracked separately in #8.

What's in this PR

  • pom.xml: two new properties (<datafusion.version>=53.1.0, <protobuf.version>=3.25.5), protobuf-java runtime dep, os-maven-plugin build extension, two download-maven-plugin executions with SHA-512 pins, and Xolstice protobuf-maven-plugin for codegen.
  • src/test/java/org/apache/datafusion/proto/ProtoGenerationTest.java: smoke test instantiating a generated class.
  • CONTRIBUTING.md: new file with the version-sync recipe.

Not in this PR

@andygrove andygrove merged commit 5292e05 into apache:main May 13, 2026
@andygrove andygrove deleted the proto-build branch May 13, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add datafusion-proto build

1 participant